package com.kds.fxtool.config;

import feign.Feign;
import feign.Logger;
import feign.gson.GsonDecoder;
import feign.gson.GsonEncoder;
import feign.okhttp.OkHttpClient;
import feign.slf4j.Slf4jLogger;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FeignConfig {
    
    @Bean
    public Logger.Level feignLoggerLevel() {
        return Logger.Level.FULL;
    }
    
    @Bean
    public feign.Client feignClient() {
        return new OkHttpClient();
    }
    
    @Bean
    public GsonEncoder gsonEncoder() {
        return new GsonEncoder();
    }
    
    @Bean
    public GsonDecoder gsonDecoder() {
        return new GsonDecoder();
    }
}